package com.study.service.serviceImpl;

import com.study.entity.AppCategory;
import com.study.service.AppcategoryService;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

import static org.junit.Assert.*;

/**
 * Created by Administrator on 2017/10/19.
 */
public class AppcategoryServiceImplTest {
    @Test
    public void getLevel2() throws Exception {
        AppcategoryService service= (AppcategoryService) context.getBean("appcategoryServiceImpl");
        List<AppCategory> list = service.getLevel2(2);
        System.out.println(list);
    }

    ClassPathXmlApplicationContext context;
    @Before
    public void setUp() throws Exception {
        context=new ClassPathXmlApplicationContext("spring/spring-config.xml");

    }

    @After
    public void tearDown() throws Exception {
    }


}